package com.gadgets.busi.bm02.repository;

import com.gadgets.busi.bm02.dto.RecipeWeightQueryDTO;
import com.gadgets.busi.bm02.pojo.MaterialRecipeWeight;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020-12-10
 *
 */
@Repository
@Mapper
public interface IMaterialRecipeWeightRepository {

    /**
     * 条件查询合成表权信息
     * @param queryDto  查询条件
     * @return          查询结果
     */
    List<MaterialRecipeWeight> queryRecipeBatchByCondition(@Param(value = "queryDto") RecipeWeightQueryDTO queryDto);

    /**
     * 保存合成表权值信息
     * @param recipeWeight  权值信息
     * @return              新增条数
     */
    int saveMaterialRecipeWeightInfo(@Param(value = "info") MaterialRecipeWeight recipeWeight);

    /**
     * 更新合成表权值信息
     * @param recipeWeight  权值信息
     * @return              更新记录数
     */
    int updateMaterialWeightInfo(@Param(value = "info") MaterialRecipeWeight recipeWeight);

}
